<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>浮动定位</title>
    <link rel="stylesheet" href="./导航栏.css">
    <style>
      .box {
        width: 200px;
        height: 200px;
        margin: 20px;
        color: white;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 16px;
        border: 4px black solid;
      }

      #box1 {
        background-color: red;
      }
      #box2 {
        position: relative;
        top: 50px;
        left: 500px;
        background-color: blue;
        z-index: 1;
      }
      #box3 {
        position: absolute;
        top: 180px;
        left: 1200px;
        background-color: green;
      }
      #box4 {
        position: fixed;
        bottom: 40px;
        right: 40px;
        background-color: gray;
      }
    </style>
</head>
<body>
    <div class="tou">
        <header>
            <ul>
                <li><a href="../首页.html">首页</a></li>
                <li><a href="./仿b站.html">仿b站</a></li>
                <li><a href="./伪元素(促销).html">伪元素(促销)</a></li>
                <li><a href="./图片悬停.html">图片悬停</a></li>
                <li><a href="./导航条.html">导航条</a></li>
                <li><a href="./浮动(图片定位).html">浮动(图片定位)</a></li>
                <li><a href="./浮动(环绕i).html">浮动(环绕)</a></li>
                <li><a href="./浮动(西游记).html">浮动(西游记)</a></li>
                <li><a href="./浮动.html">浮动</a></li>
                <li><a href="./浮动定位.html">浮动定位</a></li>
                <li><a href="./立体模型.html">立体模型</a></li>
                <li><a href="./购物车图标.html">购物车图标</a></li>
                <li><a href="./鼠标悬停.html">鼠标悬停</a></li>
                <li><a href="https://gitee.com/han-sunian/">仓库</a></li>
            </ul>
        </header>
    </div>
    <div id="box1" class="box">静态定位</div>
    <div id="box2" class="box">相对定位</div>
    <div id="box3" class="box">绝对定位</div>
    <div id="box4" class="box">固定定位</div>
</body>
</html>